package com.bright.service.Impl;

import com.bright.dao.OrginizationDao;
import com.bright.service.OrginizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

//@Component
@Service
public class OrginizationServiceImpl implements OrginizationService {
    @Autowired
    private OrginizationDao orginizationDao;

    @Autowired
    public OrginizationServiceImpl(OrginizationDao orginizationDao){
//        System.out.println("执行OrginizationServiceImpl无参构造方法");
        this.orginizationDao = orginizationDao;
    }

    private String Database;
    private int connectCount;

    @Override
    public void list() {
        connectCount = 2;
        System.out.println("数据库："+Database+" 连接数："+connectCount);
        orginizationDao.getList();
    }
}
